﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 仓位锁定明细 等于出库单明细
    /// </summary>
    [Table("T_ShippingLockCell")]
    public class ShippingLockCell:BaseEntity
    {
        /// <summary>
        /// 出库单明细Id
        /// </summary>
        public long? OrderDetailId { get; set; }
        /// <summary>
        /// 出库单号
        /// </summary>
        [MaxLength(60)]
        public string OrdeSn { get; set; }
        /// <summary>
        /// 库存Id
        /// </summary>
        public long? InventoryId { get; set; }

        /// <summary>
        /// 仓位Id
        /// </summary>
        public long? CellId { get; set; }

        /// <summary>
        /// 仓位编码
        /// </summary>
        [MaxLength(60)]
        public string CellCode { get; set; }

        /// <summary>
        /// 仓位名称
        /// </summary>
        [MaxLength(60)]
        public string CellName { get; set; }

        /// <summary>
        /// 仓位深度
        /// </summary>
        public int? CellDepthIndex { get; set; }

        /// <summary>
        /// 垛条码
        /// </summary>
        [MaxLength(60)]
        public string PalletBarcode { get; set; }
        /// <summary>
        /// 供应商编码
        /// </summary>
        [MaxLength(60)]
        public string SupplierCode { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        [MaxLength(60)]
        public string SupplierName { get; set; }
        /// <summary>
        /// 仓库编码
        /// </summary>
        [MaxLength(60)]
        public string StockCode { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        [MaxLength(60)]
        public string StockName { get; set; }

        /// <summary>
        /// 库Id
        /// </summary>
        public long? WhId { get; set; }

        /// <summary>
        /// 组垛Id
        /// </summary>
        public long? StackingStorageId { get; set; }

        /// <summary>
        /// 状态 0-创建 1-打包区 2-缓存区 3-作业中 4-已完成
        /// </summary>
        public int? Status { get; set; } = 0;

        /// <summary>
        /// 打包台
        /// </summary>
        public string PackCode { get; set; }

        /// <summary>
        /// 缓存口
        /// </summary>
        public string CachePortCode { get; set; }

        /// <summary>
        /// 出库数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? OutQty { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? InventoryQty { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        public int? LockIndex { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public long? MaterialId { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        [MaxLength(60)]
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [MaxLength(60)]
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料批次Id
        /// </summary>
        public long? MaterialKeyId { get; set; }
        [MaxLength(60)]
        public string ModelSpec { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [MaxLength(60)]
        public string BatchNo { get; set; }

        /// <summary>
        /// 是否拣选
        /// </summary>
        public bool? IsPicking { get; set; } = false;
        /// <summary>
        /// 计划发料日期
        /// </summary>
        public DateTime PartSendDate { get; set; }
        /// <summary>
        /// 巷道id
        /// </summary>
        public long? RoutewayId { get; set; }

        [NotMapped]
        public bool Checked { get; set; } = false;
    }
}